from flask import Flask, request, jsonify, has_request_context, copy_current_request_context
# from aioflask import Flask, request, jsonify, has_request_context, copy_current_request_context
from handle import ProjectConfig



ProjectIdListBase = [i for i, j in ProjectConfig.items()]
updateMembers = (0, 1,)
Tables = [
        'bugs_ext', 'bugs_level_info_ext', 'bugs_snapshot_ext', 'bugs_statistics_ext', 'task_ext', 
        'task_type_info_ext', 'bugSfcId_ext', 'projectId_columns_ext', 'bugs_statistics2week'
        ]
#########################################################################################################
# respCode
Success_Resp = {"code":200, "msg" : ""}

code801 = "Params \'projectId\' type must be \"list\"!"
code802 = "Params \'updateMembers\' is Wrong!"
code803 = "Params \'updateMembers\' type must be \"int\"!"
code804 = " Project is Locked, Please Wait for a while!"

wrongProjectIdType_Resp = {"code" : 801, "msg" : code801}
wrongUpdateMembers_Resp = {"code" : 802, "msg" : code802}
wrongUpdateMembersType_Resp = {"code" : 803, "msg" : code803}
ProjectIdisLocked_Resp = {"code" : 804, "msg" : code804}

#########################################################################################################
# 实例化
api = Flask(__name__)

host = '0.0.0.0'
port = 8880